<style>
    body {
        background-color: #FAFBFB;
    }

    .zything div {
        margin-top: 10px;
    }
</style>
<div class="rc-pagepadding ">
    <div class=" rc-pannel rc-pagepadding">

        <div class="rc-pannel-body layui-form ">

            <div class="layui-upload-drag" style="display: block;" id="installextendUploader">
                <i class="layui-icon layui-icon-upload"></i>
                <div>选择压缩包上传，压缩包格式zip</div>
            </div>
            <div>

            </div>
        </div>


    </div>

    <div class=" rc-pannel rc-margin-top-default rc-pagepadding">
        <div class="rc-pannel-body layui-form  zything">
            <div style="color:#900;font-weight:600">注意事项：</div>
            <div> 1.压缩包为zip 格式</div>
            <div> 2.压缩包内扩展必须为一级目录，即，打开压缩包需要看到扩展的描述文件describe.php</div>


        </div>
    </div>
</div>
<script>
    layui.use(function() {
        var upload = layui.upload;
        upload.render({
            accept: 'file',
            elem: ' #installextendUploader',
            url: '/admin/cnf/ComponentExtend/handleUpgrade?id=<?php echo request()->get('id')?>', // 实际使用时改成您自己的上传接口即可。
            done: function(res) {
                if (res.code == 0) {
                    toastr_success('升级成功', function() {
                        window.parent.location.reload();
                    });
                } else {
                    toastr_error(res.message);
                }
            }
        });
    });
</script>